package com.bruan.reflect;

public class TestClass1 {
    public static void main(String[] args) throws ClassNotFoundException {
        //方法一
        Class studentClass = Student.class;
            //全类名
            System.out.println(studentClass.getName());
            //简明
            System.out.println(studentClass.getSimpleName());
        //方法二
        Class aClass = Class.forName("com.bruan.reflect.Student");
        System.out.println(studentClass==aClass);
        //方法三
        Student s = new Student();
        Class aClass1 = s.getClass();
        System.out.println(aClass1==aClass);
    }
}
